export default {
  getPrams: function (url) {
    const url_ = new URL(url);
    const params = new URLSearchParams(url_.search);
    const data = {}
    params.entries().forEach(item => {
      if (item.length > 1) {
        data[item[0]] = item[1];
      }

    })
    return data
  },
  getParamsFromWindowUrl() {
    const url = window.location.href
    return this.getPrams(url)
  }
}